package io.github.lhdxhl.wechatpay.exception;

import io.github.lhdxhl.wechatpay.v3.WxResponseEntity;
import org.springframework.http.HttpEntity;

/**
 * @author lsk
 * @version 2.0.0
 * @ClassName PayException.java
 * @Description 支付异常类封装
 * @createTime 2022年09月21日 14:04:00
 */
public class PayException extends RuntimeException {
    /**
     * response maybe null
     */
    private WxResponseEntity response;

    public PayException() {
    }

    public PayException(String message) {
        super(message);
    }

    public PayException(String message, Throwable cause) {
        super(message, cause);
    }

    public PayException(Throwable cause) {
        super(cause);
    }

    public PayException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public WxResponseEntity getResponse() {
        return response;
    }

    public void setResponse(WxResponseEntity response) {
        this.response = response;
    }
}
